1. Field of the Invention
The present invention relates to a simulation apparatus of a numerical controller.
2. Description of the Related Art
When creating a program for machining a workpiece, an operator needs to calculate a start point and an end point of a moving path of a tool and create a movement command block by block. One block is one command unit forming a machining program. A machining cycle command is included in a command used for the machining program. The machining cycle command is one command adapted to perform a series of movement commands including a plurality of blocks. The machining cycle command defines a work shape and machining conditions. A numerical controller for controlling a machine tool generates a plurality of movement commands from the work shape and the machining conditions defined by the machining cycle command described in the machining program and controls a movable axis. The operator can easily create a program for machining a workpiece by using the machining cycle command.
FIG. 1 is an example of a machining program for explaining an actual machining cycle command (turning cycle). FIG. 2 is a diagram for explaining a machining command (turning conditions). FIG. 3 is a diagram for explaining a work shape command (a shape definition).
In a machining program example with a machining program name “O1000”, work information described as “G1900D50.L100.K0”, tool information described as “T1”, main spindle revolution number information described as “S500”, and a machining cycle command are described. In a machining command for designating ‘cutting condition’ of the machining cycle command, respective items are designated as shown in FIG. 2. On the other hand, in a work shape command for defining “work shape” to be cut and machined, a shape is defined on an XZ plane as shown in FIG. 3. In the machining cycle command, as shown in FIG. 4,
(a) first, a movement command 50 for cutting a cutting area is generated and executed,
(b) next, a movement command 51 for allowing a tool to escape from a cutting end position in (a) is generated and executed,
(c) next, a movement command 52 for moving the tool from an end position in (b) to a cutting start position is generated and executed, and
(d) (a) to (c) are repeated and a process for cutting the cutting area is repeated until machining of the cutting area ends.
Conventionally, before actual machining, in a numerical controller or a simulation apparatus, a simulation of the machining is performed on the basis of a machining program. A material shape, a chuck shape, and a tool shape are displayed on a screen of a image displaying device included in the numerical controller or the simulation apparatus and a state of a material being cut and a tool track are graphically displayed (simulation-rendered), whereby it is possible to check a machining operation indicated by the machining program prior to actual machining of work (see, Japanese Patent Application Laid-Open No. 2011-22666).
When a simulation of a machining program including a machining cycle command is executed by the simulation apparatus, the machining cycle command is converted into a plurality of movement commands and executed. FIG. 5 is a diagram for explaining that, when the simulation of the machining program including the machining cycle command is executed, the machining cycle command is converted (expanded) into a plurality of movement commands.
A machining program 10 includes a plurality of movement commands indicated by a movement command (a) 11 and a movement command (b) 13 and a machining cycle command 12 in which a work shape and machining conditions are commanded. When a simulation of the machining program 10 is performed by the simulation apparatus, a converted machining program 20 including a movement command (a) 21, a movement command (b) 23, and a plurality of movement commands (221, 222, . . . , 22n) converted from the machining cycle command 12 is generated from the machining program 10.
As shown in FIG. 6, the machining cycle command 12 includes a command section 12a for cutting conditions and a command section 12b for a work shape. When a machining cycle command in a machining program is executed, first, a cutting area 6 (see FIG. 7) is calculated from argument data of a work shape command of the machining cycle command. FIG. 7 is a simulation image. A cutting area of work (a work shape 4) fixed to a chuck (a shuck shape 2) is machined using a tool (a tool shape 8).
Conventionally, as shown in FIG. 8, a moving image of a machining operation of a machining cycle command can be displayed by a simulation. However, there are problems explained below.
FIG. 8 is a diagram for explaining an example of a screen configuration displayed on an image displaying device included in a conventional simulation apparatus. A screen configuration 90 includes a first display area 101 and a second display area 102. The first display area 101 is an area for displaying a simulation (a tool track or an animation rendering). A moving image of a machining operation is displayed in the first display area 101. In the second display area 102, a machining program is displayed. In the second display area 102, a cursor 110 is displayed in a block being executed. A display color of the cursor 110 is different from a display color of display areas of the other blocks.
When a simulation of a machining program including a machining cycle command is performed by a publicly-known simulation apparatus, a movement command for cutting a calculated cutting area is generated for one block, the generated movement command is immediately executed, and movement of a tool and rendering of a machining operation are performed according to the movement command. After the machining operation is completed, the next movement command in the cutting area is generated and executed. Since the generated movement command is used for the movement of the tool and the rendering of the machining operation, the movement command is temporarily stored in a memory area. However, since information concerning a movement command generated next is overwritten on the memory area in which information concerning the last movement command is stored, the information concerning the last movement command is not stored. Therefore, a movement command in the past cannot be checked again. A movement command halfway in a machining cycle command cannot be designated either. When an operator desires to check only a machining operation halfway in the machining cycle command, since the movement command halfway in the machining cycle command cannot be designated, the operator has to execute the machining cycle command from the start and needs to perform a single block operation up to a target place.